<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-nested" prefix="nested" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri='/tags/bc' prefix='bc' %>

  <table border="0" align="center" width="100%">
       <tr>
           <td>
              <table width="100%" border="0">
                 <tr>
                    <td align="left">
					   <table border="0" cellpadding="0" cellspacing="0">
					      <tr>
					         <td>
					            <a href="#" onmouseover="setOverImg('1','');overSub=true;showSubMenu('submenu1','button1');" onmouseout="setOutImg('1','');overSub=false;setTimeout('hideSubMenu(\'submenu1\')',delay);" target=""><img src="<%=request.getContextPath()%>/image/tabs/style11/button1up.png" border="0" id="button1" vspace="1" hspace="2"></a>
					         </td>
					         <td>
					            <a href="#" onmouseover="setOverImg('2','');overSub=true;showSubMenu('submenu2','button2');" onmouseout="setOutImg('2','');overSub=false;setTimeout('hideSubMenu(\'submenu2\')',delay);" target=""><img src="<%=request.getContextPath()%>/image/tabs/style11/button2up.png" border="0" id="button2" vspace="1" hspace="2"></a>
					         </td>
					         <td>
					            <a href="javascript:underDevelopment()" onmouseover="setOverImg('3','');overSub=true;showSubMenu('submenu3','button3');" onmouseout="setOutImg('3','');overSub=false;setTimeout('hideSubMenu(\'submenu3\')',delay);" target=""><img src="<%=request.getContextPath()%>/image/tabs/style11/button3up.png" border="0" id="button3" vspace="1" hspace="2"></a>
					         </td>
					         <td>
					            <a href="javascript:underDevelopment()" onmouseover="setOverImg('4','');overSub=true;showSubMenu('submenu4','button4');" onmouseout="setOutImg('4','');overSub=false;setTimeout('hideSubMenu(\'submenu4\')',delay);" target=""><img src="<%=request.getContextPath()%>/image/tabs/style11/button4up.png" border="0" id="button4" vspace="1" hspace="2"></a>
					         </td>
					         <td>
					            <a href="javascript:underDevelopment()" onmouseover="setOverImg('5','');overSub=true;showSubMenu('submenu5','button5');" onmouseout="setOutImg('5','');overSub=false;setTimeout('hideSubMenu(\'submenu5\')',delay);" target=""><img src="<%=request.getContextPath()%>/image/tabs/style11/button5up.png" border="0" id="button5" vspace="1" hspace="2"></a>
					         </td>
					         <td>
					            <a href="#" onmouseover="setOverImg('6','');overSub=true;showSubMenu('submenu6','button6');" onmouseout="setOutImg('6','');overSub=false;setTimeout('hideSubMenu(\'submenu6\')',delay);" target=""><img src="<%=request.getContextPath()%>/image/tabs/style11/button6up.png" border="0" id="button6" vspace="1" hspace="2"></a>
					         </td>
					         <td>
					            <a href="javascript:underDevelopment()" onmouseover="setOverImg('7','');overSub=true;showSubMenu('submenu7','button7');" onmouseout="setOutImg('7','');overSub=false;setTimeout('hideSubMenu(\'submenu7\')',delay);" target=""><img src="<%=request.getContextPath()%>/image/tabs/style11/button7up.png" border="0" id="button7" vspace="1" hspace="2"></a>
					         </td>
					         <td>
					            <a href="javascript:underDevelopment()" onmouseover="setOverImg('8','');overSub=true;showSubMenu('submenu8','button8');" onmouseout="setOutImg('8','');overSub=false;setTimeout('hideSubMenu(\'submenu8\')',delay);" target=""><img src="<%=request.getContextPath()%>/image/tabs/style11/button8up.png" border="0" id="button8" vspace="1" hspace="2"></a>
					         </td>
					         <td>
					            <a href="<%=request.getContextPath()%>/worksheet.do?action=home" onmouseover="setOverImg('9','');overSub=true;showSubMenu('submenu9','button9');" onmouseout="setOutImg('9','');overSub=false;setTimeout('hideSubMenu(\'submenu9\')',delay);" target=""><img src="<%=request.getContextPath()%>/image/tabs/style11/button9up.png" border="0" id="button9" vspace="1" hspace="2"></a>
					         </td>				         
					      </tr>
					   </table>
                    </td>
                 </tr>
              </table>
           </td>
       </tr>        
   </table>
	
			<nested:iterate id="subject" name="tabMenuInfo" scope="session">
			
				<nested:define id="anchorId" name="subject" property="anchorid"/>
				<nested:define id="menuId" name="subject" property="menuid"/>
				<nested:define id="subject_name" name="subject" property="name"/>
				<!-- Set the javascript data -->
				<script type="text/javascript">
				    //jkmegamenu.definemenu("anchorid", "menuid", "mouseover|click")
					jkmegamenu.definemenu("<%=anchorId%>", "<%=menuId%>",   "mouseover");
				</script>  
				<!-- Main tab information -->
				<a href="#" id="<%=anchorId%>">
					<nested:write name="subject" property="name"/>
				</a>&nbsp;&nbsp;			
		
				<div id="<%=menuId%>" class="megamenu">
					<nested:iterate id="topic" name="subject" property="topicInfo" indexId="counter">
					    <nested:define id="topic_name" name="topic" property="name" />
						<div class="column">
							<h3><nested:write name="topic" property="name"/></h3>
							<ul>
								<nested:iterate id="link_data" property="links" >
									<nested:define id="linkvalue" name="link_data" property="link"/>
										<%
											String link_string = request.getContextPath() + "/" + linkvalue + "&subject=" + subject_name + "&topic=" + topic_name;
										%>
										<li><a href="<%=link_string%>"><nested:write name="link_data" property="name"/></a></li>
								</nested:iterate>
							</ul>
						</div>
						<% System.out.println("================> Counter: " + counter); %>
						<logic:equal name="counter" value="3">
							<% System.out.println("================> Break is needed"); %>
							<br style="clear: left" /> <!--Break after 3rd column. Move this if desired-->
						</logic:equal>
					</nested:iterate>
				</div>
			</nested:iterate>
			<br/>
			<bc:bc/>
